TreeCursor

A stateful object for walking a syntax Tree efficiently.

Constructors

this
this(TSTreeCursor tstreecursor)

Create a new tree cursor

this
this(TreeCursor otherTreeCursor)

Copy a tree cursor

this
this(TreeCursor* otherTreeCursor)

Copy a tree cursor

Destructor

~this
~this()
Undocumented in source.

Postblit

this(this)
this(this)
Undocumented in source.

Members

Functions

field_id
auto field_id()

Get the numerical field id of this tree cursor's current node.

field_name
auto field_name()

Get the field name of this tree cursor's current node.

goto_first_child
auto goto_first_child()

Move this cursor to the first child of its current node.

goto_first_child_for_byte
auto goto_first_child_for_byte(size_t index)

Move this cursor to the first child of its current node that extends beyond the given byte offset.

goto_next_sibling
auto goto_next_sibling()

Move this cursor to the next sibling of its current node.

goto_parent
auto goto_parent()

Move this cursor to the parent of its current node.

node
auto node()

Get the tree cursor's current Node.

reset
auto reset(Node node)

Re-initialize this tree cursor to start at a different node.

Variables

tstreecursor
TSTreeCursor tstreecursor;

internal TSTreeCursor

Meta